home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: How to the size of a file in C ?
- Date: Mon, 12 Feb 96 21:39:02 GMT
- Organization: none
- Message-ID: <824161142snz@genesis.demon.co.uk>
- References: <4ffeqa$pjh@brtph500.bnr.ca> <4ffs5g$a71@kryten.awinc.com> <4fh4qe$487@kryten.awinc.com>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4fh4qe$487@kryten.awinc.com>
- jenna.design@awinc.com "jenna design" writes:
-
- >Thanks to Darrell Grainger for pointing out a pitfall in the
- >above code.
- >The above function is fairly useless on 16 bit computers
- >as if the returned value exceeds the maximum value a long
- >variable can hold the variable will overflow.
- >
- >in 16-bit LONG_MAX is defined as 32767
-
- No. INT_MAX may be that small but the C language requires that LONG_MAX
- to be at least 2147483647 so in most cases it works fine.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-